.DashboardHeader {
  background-color: white;
  border-bottom: var(--border-size) var(--border-style) var(--color-border);
}

.Dash-wrapper {
  width: 100%;
}

@media screen and (--breakpoint-min-sm) {
  .Dash-wrapper {
    max-width: var(--sm-width);
  }
}

@media screen and (--breakpoint-min-md) {
  .Dash-wrapper {
    max-width: var(--md-width);
  }
}

@media screen and (--breakpoint-min-lg) {
  .Dash-wrapper {
    max-width: var(--lg-width);
  }
}

/* Fullscreen mode */
.Dashboard.Dashboard--fullscreen {
  min-height: 100vh;
}

.Dashboard.Dashboard--fullscreen .Header-button {
  color: var(--color-text-light);
}

.Dashboard.Dashboard--fullscreen .DashboardHeader {
  background-color: transparent;
  border: none;
}
.Dashboard.Dashboard--fullscreen .Header-title-description {
  display: none;
}

/* Night mode */
.Dashboard.Dashboard--night {
  background-color: var(--color-bg-black);
}

.Dashboard.Dashboard--night .DashboardHeader {
  color: var(--color-text-white);
}

.Dashboard.Dashboard--night .Card {
  color: var(--color-text-white);
}

.Dashboard.Dashboard--night .Header-button {
  color: var(--color-text-medium);
}

.Dashboard.Dashboard--fullscreen .fullscreen-normal-text {
  color: var(--color-text-dark);
  transition: color 1s linear;
}

.Dashboard.Dashboard--night.Dashboard--fullscreen .fullscreen-night-text {
  color: color(var(--color-text-white) alpha(-14%));
  transition: color 1s linear;
}

.Dashboard.Dashboard--night .DashCard .Card svg text {
  fill: color(var(--color-text-white) alpha(-14%)) !important;
}

.Dashboard.Dashboard--night .DashCard .Card {
  background-color: var(--night-mode-card);
  border-color: var(--night-mode-card);
}

.Dashboard.Dashboard--night .enable-dots-onhover .dc-tooltip circle.dot:hover,
.Dashboard.Dashboard--night .enable-dots .dc-tooltip circle.dot {
  fill: currentColor;
}

.Dashboard.Dashboard--night .bg-light {
  background-color: var(--color-bg-black);
}

.Dashboard.Dashboard--night .bg-medium {
  background-color: #596269;
}

.Dashboard.Dashboard--night .text-dark {
  color: var(--color-bg-light);
}

.Dashboard.Dashboard--night .border-top,
.Dashboard.Dashboard--night .border-left,
.Dashboard.Dashboard--night .border-bottom,
.Dashboard.Dashboard--night .border-right {
  border-color: var(--color-bg-dark);
}

/* Night mode transition */
.Dashboard.Dashboard--fullscreen,
.Dashboard.Dashboard--fullscreen .DashCard .Card {
  transition: background-color 1s linear, border 1s linear;
}

.DashboardGrid {
  margin-top: 1em;
}

.Dash--editing {
  margin-top: 1.5em;
}

.DashCard {
  position: relative;
  z-index: 2;
}

.DashCard .Card {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: white;
  border: 1px solid var(--color-border);
}

.DashCard .Card.Card--slow {
  border-color: var(--color-accent4);
}

.Dash--editing .DashCard .Card {
  transition: border 0.3s, background-color 0.3s;
}

.Dash--editing .Card-title:first-of-type {
  margin-top: 0.5rem;
}

.Dash--editing .DashCard:hover .Card .Card-heading {
  z-index: 2;
}

/* Google Maps widgets */
.DashCard .gm-style-mtc,
.DashCard .gm-bundled-control,
.DashCard .PinMapUpdateButton,
.leaflet-container .leaflet-control-container {
  opacity: 0.01;
  transition: opacity 0.3s linear;
}
.DashCard:hover .gm-style-mtc,
.DashCard:hover .gm-bundled-control,
.DashCard:hover .PinMapUpdateButton,
.leaflet-container:hover .leaflet-control-container {
  opacity: 1;
}

.Dash--editing .PinMap {
  /* allow map to pan. need to stopPropagation in PinMap to prevent weird dragging interaction */
  pointer-events: all;
}

.PinMapUpdateButton--disabled {
  pointer-events: none;
  color: var(--color-text-light);
}

.Dash--editing .DashCard .Card {
  user-select: none;
}

.DashCard .Card {
  box-shadow: 0px 1px 3px var(--color-shadow);
  border-color: transparent;
  border-radius: 8px;
}

.Dash--editing .DashCard.dragging .Card {
  box-shadow: 3px 3px 8px var(--color-shadow);
}

.Dash--editing .DashCard.dragging,
.Dash--editing .DashCard.resizing {
  z-index: 3;
}

.Dash--editing .DashCard.dragging .Card,
.Dash--editing .DashCard.resizing .Card {
  background-color: var(--color-bg-medium) !important;
  border: 1px solid var(--color-brand);
}

.Dash--editing .DashCard .Visualization-slow-spinner {
  position: absolute;
  right: -2px;
  top: -2px;
}
.Dash--editing .DashCard:hover .Visualization-slow-spinner {
  opacity: 0;
  transition: opacity 0.15s linear;
}

.Dash--editing .DashCard {
  transition: transform 0.3s;
}

.Dash--editing .DashCard.dragging,
.Dash--editing .DashCard.resizing {
  transition: transform 0s;
}

.Dash--editing .DashCard {
  cursor: move;
}

.Dash--editing .DashCard .react-resizable-handle {
  position: absolute;
  width: 40px;
  height: 40px;
  bottom: 0;
  right: 0;
  cursor: nwse-resize;
  z-index: 1; /* ensure the handle is above the card contents */
}

.Dash--editing .DashCard .react-resizable-handle:after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  bottom: 6px;
  right: 6px;
  border-bottom: 2px solid var(--color-border);
  border-right: 2px solid var(--color-border);
  border-bottom-right-radius: 2px;
  transition: opacity 0.2s;
  opacity: 0.01;
}

.Dash--editing .DashCard .react-resizable-handle:hover:after {
  border-color: var(--color-border);
}

.Dash--editing .DashCard:hover .react-resizable-handle:after {
  opacity: 1;
}

.Dash--editing .DashCard.dragging .react-resizable-handle:after,
.Dash--editing .DashCard.resizing .react-resizable-handle:after {
  opacity: 0.01;
}

.Dash--editing .react-grid-placeholder {
  z-index: 0;
  background-color: var(--color-bg-light);
  transition: all 0.15s linear;
}

.Dash--editing .Card-title {
  pointer-events: none;
}

.Modal.AddSeriesModal {
  height: 80%;
  max-height: 600px;
  width: 80%;
  max-width: 1024px;
}

/*

  fullscreen text size modifications

*/

/*
  increase the base font size in fullscreen mode to bump things up to
  accomodate for viewing distance on TVs etc
*/
@media screen and (min-width: 1280px) {
  .Dashboard.Dashboard--fullscreen {
    font-size: 1.2em;
  }
  /* keep the dashboard header title from being overwhelmingly large */
  .Dashboard.Dashboard--fullscreen .Header-title-name {
    font-size: 1em;
  }
  /* keep the single row text cards to avoid overflow with a scroll bar */
  .Dashboard.Dashboard--fullscreen .Text--single-row {
    font-size: 0.85em;
  }
  .Dashboard.Dashboard--fullscreen .fullscreen-text-small .LegendItem {
    font-size: 1em;
  }
}

@media screen and (min-width: 1540px) {
  .Dashboard.Dashboard--fullscreen {
    font-size: 1.4em;
  }
}

/* what for to print the dashboards */
@media print {
  header,
  nav {
    display: none;
  }
  .DashCard .Card {
    box-shadow: none;
    border-color: var(--color-border);
  }
  /* improve label contrast */
  .dc-chart .axis .tick text,
  .dc-chart .x-axis-label,
  .dc-chart .y-axis-label {
    fill: var(--color-text-dark);
  }
}

@media print and (orientation: portrait) {
  html {
    width: 8.5in;
  }
}
@media print and (orientation: landscape) {
  html {
    width: 11in;
  }
}

@page {
  margin: 1cm;
}

/* when in night mode goal lines should be more visible */
.Dashboard--night .goal .line,
.Dashboard--night .trend .line {
  stroke: white;
}

/* when in night mode code snippets should have a more readable background-color */
.Dashboard--night pre code {
  background-color: color(var(--color-bg-white) alpha(-86%));
}

.Dashboard--night text.value-label-outline {
  stroke: var(--night-mode-card);
}

.Dashboard text.value-label,
.Dashboard text.value-label-outline,
.Dashboard text.value-label-white,
.Dashboard .LineAreaBarChart .dc-chart .axis text {
  font-size: 12px;
}

.ScalarValue {
  font-weight: 900;
  font-size: 1.8rem;
}

.SmartWrapper {
  font-size: 1.4em;
}

.Dashboard .SmartWrapper {
  position: relative;
  font-size: inherit;
}

.AutomaticDashboard.AutomaticDashboard--withSidebar #SmartScalar-PreviousValue {
  display: none !important;
}

@media screen and (min-width: 1280px) {
  .ScalarValue {
    font-size: 2.2rem;
  }
  .AutomaticDashboard.AutomaticDashboard--withSidebar
    #SmartScalar-PreviousValue {
    display: none;
  }
}

@media screen and (min-width: 1540px) {
  .ScalarValue {
    font-size: 2.8rem;
  }
  .AutomaticDashboard.AutomaticDashboard--withSidebar
    #SmartScalar-PreviousValue {
    display: inherit;
  }
}
